#include "mediator.h"

int main(){
    std::shared_ptr<Mediator> media = std::make_shared<ConCreteMediator>();

    std::shared_ptr<Colleague> colleague1 = std::make_shared<ConcreteCollegue>("张三",media);
    media->registColleague(colleague1);

    std::shared_ptr<Colleague> colleague2 = std::make_shared<ConcreteCollegue>("李四",media);
    media->registColleague(colleague2);

    std::shared_ptr<Colleague> colleague3 = std::make_shared<ConcreteCollegue>("王五",media);
    media->registColleague(colleague3);

    colleague1->send("hello from 张三");


    return 0;
}